@import "../../sassmixins/mixins";

body {
  height: 100%;
  overflow-y: hidden;
  background-color: #f8f8f8;
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ant-layout-aside {
  position: relative;
  height: 100vh;
  min-width: 1200px;
  -webkit-transition: all 0.3s ease;
}

.ant-menu-inline, .ant-menu-vertical {
  border-right: 0;
}

.ant-layout-aside .ant-layout-logo {
  width: 150px;
  height: 32px;
  border-radius: 6px;
  margin: 16px 24px 16px 28px;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  line-height: 32px;
  font-size: 16px;
  text-align: center;
  background-color: #333;
  color: #fff;
}

.ant-layout-aside .light .ant-layout-logo {

  background-color: #fff;
  color: rgba(0, 0, 0, 0.65);
}

.ant-layout-aside .ant-layout-sider {
  width: 224px;
  background: #404040;
  position: absolute;
  padding-bottom: 24px;
  height: 100%;

  &.light {
    background-color: #ffffff;
    .switch-theme {
      background: #fff;
      border-top: 1px solid #f8f8f8;
      color: rgba(0, 0, 0, 0.65);
    }
  }
}

.ant-layout-aside .ant-layout-sider > .ant-menu {
  margin-bottom: 20px;
}

.ant-layout-aside .ant-layout-header {
  box-shadow: 4px 4px 40px 0 rgba(0, 0, 0, .05);
  position: relative;
  height: 47px;

  .sider-button {
    height: 47px;
    width: 47px;
    line-height: 47px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    position: absolute;
    -webkit-transition: all .3s cubic-bezier(.55, .055, .675, .19);
    transition: all .3s cubic-bezier(.55, .055, .675, .19);
  }

  .ant-menu-horizontal > .ant-menu-submenu {
    float: right;
  }
}

.ant-layout-aside .ant-layout-breadcrumb {
  height: 64px;
  line-height: 64px;
  padding: 0 24px;
  margin-bottom: -24px;
}

//.ant-layout-aside .ant-layout-main {
//  margin-left: 224px;
//}

.ant-layout-sider {
  width: 224px;
  background: #404040;
  position: absolute;
  overflow: visible;
  padding-bottom: 24px;
  height: 100vh;
  -webkit-transition: all .3s cubic-bezier(.215, .61, .355, 1);
  transition: all .3s cubic-bezier(.215, .61, .355, 1);
  box-shadow: 4px 4px 20px 0 rgba(0, 0, 0, .01);
}

.ant-layout-main {
  margin-left: 224px;
  overflow: auto;
  height: 100vh;
  -webkit-transition: all .3s cubic-bezier(.215, .61, .355, 1);
  transition: all .3s cubic-bezier(.215, .61, .355, 1);
}

.ant-layout-aside .ant-layout-container {
  margin: 24px 16px;
}

.ant-layout-aside .ant-layout-content {
  min-height: calc(100vh - 184px);
  position: relative;

  .content-inner {
    background: #fff;
    padding: 24px;
    box-shadow: 4px 4px 20px 0 rgba(0, 0, 0, .01);
    min-height: calc(100vh - 184px);
  }
}

.ant-layout-aside .ant-layout-footer {
  height: 48px;
  line-height: 48px;
  text-align: center;
  font-size: 12px;
  color: #999;
  background: #fff;
  box-shadow: 4px 4px 40px 0 rgba(0, 0, 0, .05);
  width: 100%;
}

.switch-theme {
  width: 100%;
  position: absolute;
  bottom: 0;
  height: 48px;
  background-color: #494949;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0 16px 0 24px;
  overflow: hidden;
  color: #ffffff;

  span {
    white-space: nowrap;
    overflow: hidden;
  }
}

.ant-layout-aside.fold {

  .ant-layout-sider {
    width: 42px;
    .ant-layout-logo {
      width: 32px;
      margin: 16px auto;
      transition: all 0.3s ease;
    }
    .ant-menu-root {
      width: 100%;
      border-right: 0;
      > .ant-menu-item {
        padding: 0;
        text-align: center;
      }
    }

    .ant-menu-root > .ant-menu-submenu > .ant-menu-submenu-title {
      padding: 0;
      text-align: center;
      &::after {
        content: none;
      }
    }

    .ant-menu-root > .ant-menu-submenu > .ant-menu-submenu-title .anticon {
      font-size: 18px;
      margin-right: 0;
      transition: all 0.3s ease;
    }

    .ant-menu-root > .ant-menu-item .anticon {
      font-size: 18px;
      margin-right: 0;
      transition: all 0.3s ease;
    }
  }
  .ant-layout-main {
    margin-left: 42px;
  }
}

.login-loading {
  .ant-spin {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 4;
  }

  .ant-spin-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
  }

  .ant-spin-text {
    position: absolute;
    top: 50%;
    width: 100%;
    padding-top: 20px;
  }
}

.login-loading {
  .login_form {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -160px 0 0 -160px;
    width: 320px;
    height: 320px;
    padding: 36px;
    box-shadow: 0 0 100px rgba(0, 0, 0, .08);

    .login_logo {
      text-align: center;
      height: 40px;
      line-height: 40px;
      cursor: pointer;
      margin-bottom: 24px;
    }

    button {
      width: 100%;
    }
  }

  .ant-spin-container {
    height: 100vh;
  }
}

#nprogress {
  pointer-events: none;

  .bar {
    background: #108ee9;
    position: fixed;
    z-index: 1024;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
  }

  .peg {
    display: block;
    position: absolute;
    right: 0;
    width: 100px;
    height: 100%;
    box-shadow: 0 0 10px #108ee9, 0 0 5px #108ee9;
    opacity: 1.0;
    transform: rotate(3deg) translate(0px, -4px);
  }

  .spinner {
    display: block;
    position: fixed;
    z-index: 1031;
    top: 15px;
    right: 15px;
  }

  .spinner-icon {
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: solid 2px transparent;
    border-top-color: #108ee9;
    border-left-color: #108ee9;
    border-radius: 50%;
    animation: nprogress-spinner 400ms linear infinite;
  }
}

.nprogress-custom-parent {
  overflow: hidden;
  position: relative;

  #nprogress {
    .bar,
    .spinner {
      position: absolute;
    }
  }
}

@keyframes nprogress-spinner {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

